<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAuthsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('auths', function (Blueprint $table) {
            $table->increments('id');
            $table->enum('is_menu',[0,1])->default(0)->comment('是否菜单权限0:不是1：是');
            $table->string('auth_name','50')->default('')->comment('权限名');
            $table->string('route_name','50')->default('')->comment('路由别名');
            $table->unsignedInteger('pid')->default(0)->comment('上级权限id');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('auths');
    }
}
